<?
  class error{
   protected function show_error(){   	 $tmp=func_get_args();
   	 $err="in the module <strong>".$tmp[0]."</strong> -> ";     switch($tmp[0]){   	  case "db":{       if(mysql_error($tmp[2])){
        $err.= $tmp[3]."<br />";
        $err.= mysql_error($tmp[2]);
        $this->print_error($err);
       }
      }break;

      case "buffer":{       $err.="path file wrong ".$tmp[1];
       $this->print_error($err);
      }break;

	  default:{	  	$err="not undestand type error</br><hr/>";
	  	foreach($tmp as $key=>$value){	  	 $err.="<br>".$value."<br>";
	  	}
	  	$err.="<hr><br/>";
	  	$this->print_error($err);
	  	};break;
     }


   }

   private function print_error($err){   	echo"<div style='clear: both;'><div style='border:1px solid;padding:10px;position:relative;top:10px;float:left ;margin:10px;'><font color='red'>$err</font></div><br/></div>";
   }

   protected function show_404($method="", $params=""){   	$this->view->view("templates/errors/404.tpl",$this->lang);
   	exit;
   }

  }
?>